/*
 * MIT License
 *
 * Copyright (c) 2023 OrdinaryRoad
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: douyin.proto

// Protobuf Java Version: 3.25.3
package tech.ordinaryroad.live.chat.client.codec.douyin.protobuf;

/**
 * <pre>
 * from https://github.com/scx567888/live-room-watcher/blob/master/src/main/proto/douyin_hack/webcast/im/RoomMessage.proto
 * </pre>
 *
 * Protobuf type {@code RoomMessage}
 */
public final class RoomMessage extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:RoomMessage)
    RoomMessageOrBuilder {
private static final long serialVersionUID = 0L;
  // Use RoomMessage.newBuilder() to construct.
  private RoomMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private RoomMessage() {
    content_ = "";
    roommessagetype_ = 0;
    bizScene_ = "";
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new RoomMessage();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return Douyin.internal_static_RoomMessage_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @Override
  protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
      int number) {
    switch (number) {
      case 30:
        return internalGetBuriedPointMap();
      default:
        throw new RuntimeException(
            "Invalid map field number: " + number);
    }
  }
  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return Douyin.internal_static_RoomMessage_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            RoomMessage.class, Builder.class);
  }

  private int bitField0_;
  public static final int COMMON_FIELD_NUMBER = 1;
  private Common common_;
  /**
   * <code>.Common common = 1;</code>
   * @return Whether the common field is set.
   */
  @Override
  public boolean hasCommon() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <code>.Common common = 1;</code>
   * @return The common.
   */
  @Override
  public Common getCommon() {
    return common_ == null ? Common.getDefaultInstance() : common_;
  }
  /**
   * <code>.Common common = 1;</code>
   */
  @Override
  public CommonOrBuilder getCommonOrBuilder() {
    return common_ == null ? Common.getDefaultInstance() : common_;
  }

  public static final int CONTENT_FIELD_NUMBER = 2;
  @SuppressWarnings("serial")
  private volatile Object content_ = "";
  /**
   * <code>string content = 2;</code>
   * @return The content.
   */
  @Override
  public String getContent() {
    Object ref = content_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      content_ = s;
      return s;
    }
  }
  /**
   * <code>string content = 2;</code>
   * @return The bytes for content.
   */
  @Override
  public com.google.protobuf.ByteString
      getContentBytes() {
    Object ref = content_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      content_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int SUPPROTLANDSCAPE_FIELD_NUMBER = 3;
  private boolean supprotLandscape_ = false;
  /**
   * <code>bool supprotLandscape = 3;</code>
   * @return The supprotLandscape.
   */
  @Override
  public boolean getSupprotLandscape() {
    return supprotLandscape_;
  }

  public static final int ROOMMESSAGETYPE_FIELD_NUMBER = 4;
  private int roommessagetype_ = 0;
  /**
   * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
   * @return The enum numeric value on the wire for roommessagetype.
   */
  @Override public int getRoommessagetypeValue() {
    return roommessagetype_;
  }
  /**
   * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
   * @return The roommessagetype.
   */
  @Override public RoomMsgTypeEnum getRoommessagetype() {
    RoomMsgTypeEnum result = RoomMsgTypeEnum.forNumber(roommessagetype_);
    return result == null ? RoomMsgTypeEnum.UNRECOGNIZED : result;
  }

  public static final int SYSTEMTOPMSG_FIELD_NUMBER = 5;
  private boolean systemTopMsg_ = false;
  /**
   * <code>bool systemTopMsg = 5;</code>
   * @return The systemTopMsg.
   */
  @Override
  public boolean getSystemTopMsg() {
    return systemTopMsg_;
  }

  public static final int FORCEDGUARANTEE_FIELD_NUMBER = 6;
  private boolean forcedGuarantee_ = false;
  /**
   * <code>bool forcedGuarantee = 6;</code>
   * @return The forcedGuarantee.
   */
  @Override
  public boolean getForcedGuarantee() {
    return forcedGuarantee_;
  }

  public static final int BIZSCENE_FIELD_NUMBER = 20;
  @SuppressWarnings("serial")
  private volatile Object bizScene_ = "";
  /**
   * <code>string bizScene = 20;</code>
   * @return The bizScene.
   */
  @Override
  public String getBizScene() {
    Object ref = bizScene_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      bizScene_ = s;
      return s;
    }
  }
  /**
   * <code>string bizScene = 20;</code>
   * @return The bytes for bizScene.
   */
  @Override
  public com.google.protobuf.ByteString
      getBizSceneBytes() {
    Object ref = bizScene_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      bizScene_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int BURIEDPOINTMAP_FIELD_NUMBER = 30;
  private static final class BuriedPointMapDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<
        String, String> defaultEntry =
            com.google.protobuf.MapEntry
            .<String, String>newDefaultInstance(
                Douyin.internal_static_RoomMessage_BuriedPointMapEntry_descriptor,
                com.google.protobuf.WireFormat.FieldType.STRING,
                "",
                com.google.protobuf.WireFormat.FieldType.STRING,
                "");
  }
  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<
      String, String> buriedPointMap_;
  private com.google.protobuf.MapField<String, String>
  internalGetBuriedPointMap() {
    if (buriedPointMap_ == null) {
      return com.google.protobuf.MapField.emptyMapField(
          BuriedPointMapDefaultEntryHolder.defaultEntry);
    }
    return buriedPointMap_;
  }
  public int getBuriedPointMapCount() {
    return internalGetBuriedPointMap().getMap().size();
  }
  /**
   * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
   */
  @Override
  public boolean containsBuriedPointMap(
      String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    return internalGetBuriedPointMap().getMap().containsKey(key);
  }
  /**
   * Use {@link #getBuriedPointMapMap()} instead.
   */
  @Override
  @Deprecated
  public java.util.Map<String, String> getBuriedPointMap() {
    return getBuriedPointMapMap();
  }
  /**
   * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
   */
  @Override
  public java.util.Map<String, String> getBuriedPointMapMap() {
    return internalGetBuriedPointMap().getMap();
  }
  /**
   * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
   */
  @Override
  public /* nullable */
String getBuriedPointMapOrDefault(
      String key,
      /* nullable */
String defaultValue) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<String, String> map =
        internalGetBuriedPointMap().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
   */
  @Override
  public String getBuriedPointMapOrThrow(
      String key) {
    if (key == null) { throw new NullPointerException("map key"); }
    java.util.Map<String, String> map =
        internalGetBuriedPointMap().getMap();
    if (!map.containsKey(key)) {
      throw new IllegalArgumentException();
    }
    return map.get(key);
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (((bitField0_ & 0x00000001) != 0)) {
      output.writeMessage(1, getCommon());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
    }
    if (supprotLandscape_ != false) {
      output.writeBool(3, supprotLandscape_);
    }
    if (roommessagetype_ != RoomMsgTypeEnum.DEFAULTROOMMSG.getNumber()) {
      output.writeEnum(4, roommessagetype_);
    }
    if (systemTopMsg_ != false) {
      output.writeBool(5, systemTopMsg_);
    }
    if (forcedGuarantee_ != false) {
      output.writeBool(6, forcedGuarantee_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bizScene_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 20, bizScene_);
    }
    com.google.protobuf.GeneratedMessageV3
      .serializeStringMapTo(
        output,
        internalGetBuriedPointMap(),
        BuriedPointMapDefaultEntryHolder.defaultEntry,
        30);
    getUnknownFields().writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getCommon());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(content_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
    }
    if (supprotLandscape_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(3, supprotLandscape_);
    }
    if (roommessagetype_ != RoomMsgTypeEnum.DEFAULTROOMMSG.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, roommessagetype_);
    }
    if (systemTopMsg_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(5, systemTopMsg_);
    }
    if (forcedGuarantee_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(6, forcedGuarantee_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bizScene_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, bizScene_);
    }
    for (java.util.Map.Entry<String, String> entry
         : internalGetBuriedPointMap().getMap().entrySet()) {
      com.google.protobuf.MapEntry<String, String>
      buriedPointMap__ = BuriedPointMapDefaultEntryHolder.defaultEntry.newBuilderForType()
          .setKey(entry.getKey())
          .setValue(entry.getValue())
          .build();
      size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(30, buriedPointMap__);
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof RoomMessage)) {
      return super.equals(obj);
    }
    RoomMessage other = (RoomMessage) obj;

    if (hasCommon() != other.hasCommon()) return false;
    if (hasCommon()) {
      if (!getCommon()
          .equals(other.getCommon())) return false;
    }
    if (!getContent()
        .equals(other.getContent())) return false;
    if (getSupprotLandscape()
        != other.getSupprotLandscape()) return false;
    if (roommessagetype_ != other.roommessagetype_) return false;
    if (getSystemTopMsg()
        != other.getSystemTopMsg()) return false;
    if (getForcedGuarantee()
        != other.getForcedGuarantee()) return false;
    if (!getBizScene()
        .equals(other.getBizScene())) return false;
    if (!internalGetBuriedPointMap().equals(
        other.internalGetBuriedPointMap())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasCommon()) {
      hash = (37 * hash) + COMMON_FIELD_NUMBER;
      hash = (53 * hash) + getCommon().hashCode();
    }
    hash = (37 * hash) + CONTENT_FIELD_NUMBER;
    hash = (53 * hash) + getContent().hashCode();
    hash = (37 * hash) + SUPPROTLANDSCAPE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getSupprotLandscape());
    hash = (37 * hash) + ROOMMESSAGETYPE_FIELD_NUMBER;
    hash = (53 * hash) + roommessagetype_;
    hash = (37 * hash) + SYSTEMTOPMSG_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getSystemTopMsg());
    hash = (37 * hash) + FORCEDGUARANTEE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getForcedGuarantee());
    hash = (37 * hash) + BIZSCENE_FIELD_NUMBER;
    hash = (53 * hash) + getBizScene().hashCode();
    if (!internalGetBuriedPointMap().getMap().isEmpty()) {
      hash = (37 * hash) + BURIEDPOINTMAP_FIELD_NUMBER;
      hash = (53 * hash) + internalGetBuriedPointMap().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static RoomMessage parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomMessage parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomMessage parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomMessage parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomMessage parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static RoomMessage parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static RoomMessage parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static RoomMessage parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public static RoomMessage parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static RoomMessage parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static RoomMessage parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static RoomMessage parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(RoomMessage prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * from https://github.com/scx567888/live-room-watcher/blob/master/src/main/proto/douyin_hack/webcast/im/RoomMessage.proto
   * </pre>
   *
   * Protobuf type {@code RoomMessage}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:RoomMessage)
      RoomMessageOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return Douyin.internal_static_RoomMessage_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
        int number) {
      switch (number) {
        case 30:
          return internalGetBuriedPointMap();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
        int number) {
      switch (number) {
        case 30:
          return internalGetMutableBuriedPointMap();
        default:
          throw new RuntimeException(
              "Invalid map field number: " + number);
      }
    }
    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return Douyin.internal_static_RoomMessage_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              RoomMessage.class, Builder.class);
    }

    // Construct using tech.ordinaryroad.live.chat.client.codec.douyin.protobuf.RoomMessage.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getCommonFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      common_ = null;
      if (commonBuilder_ != null) {
        commonBuilder_.dispose();
        commonBuilder_ = null;
      }
      content_ = "";
      supprotLandscape_ = false;
      roommessagetype_ = 0;
      systemTopMsg_ = false;
      forcedGuarantee_ = false;
      bizScene_ = "";
      internalGetMutableBuriedPointMap().clear();
      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return Douyin.internal_static_RoomMessage_descriptor;
    }

    @Override
    public RoomMessage getDefaultInstanceForType() {
      return RoomMessage.getDefaultInstance();
    }

    @Override
    public RoomMessage build() {
      RoomMessage result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public RoomMessage buildPartial() {
      RoomMessage result = new RoomMessage(this);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartial0(RoomMessage result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.common_ = commonBuilder_ == null
            ? common_
            : commonBuilder_.build();
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.content_ = content_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.supprotLandscape_ = supprotLandscape_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.roommessagetype_ = roommessagetype_;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.systemTopMsg_ = systemTopMsg_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.forcedGuarantee_ = forcedGuarantee_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.bizScene_ = bizScene_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.buriedPointMap_ = internalGetBuriedPointMap();
        result.buriedPointMap_.makeImmutable();
      }
      result.bitField0_ |= to_bitField0_;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof RoomMessage) {
        return mergeFrom((RoomMessage)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(RoomMessage other) {
      if (other == RoomMessage.getDefaultInstance()) return this;
      if (other.hasCommon()) {
        mergeCommon(other.getCommon());
      }
      if (!other.getContent().isEmpty()) {
        content_ = other.content_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (other.getSupprotLandscape() != false) {
        setSupprotLandscape(other.getSupprotLandscape());
      }
      if (other.roommessagetype_ != 0) {
        setRoommessagetypeValue(other.getRoommessagetypeValue());
      }
      if (other.getSystemTopMsg() != false) {
        setSystemTopMsg(other.getSystemTopMsg());
      }
      if (other.getForcedGuarantee() != false) {
        setForcedGuarantee(other.getForcedGuarantee());
      }
      if (!other.getBizScene().isEmpty()) {
        bizScene_ = other.bizScene_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      internalGetMutableBuriedPointMap().mergeFrom(
          other.internalGetBuriedPointMap());
      bitField0_ |= 0x00000080;
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              input.readMessage(
                  getCommonFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000001;
              break;
            } // case 10
            case 18: {
              content_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 24: {
              supprotLandscape_ = input.readBool();
              bitField0_ |= 0x00000004;
              break;
            } // case 24
            case 32: {
              roommessagetype_ = input.readEnum();
              bitField0_ |= 0x00000008;
              break;
            } // case 32
            case 40: {
              systemTopMsg_ = input.readBool();
              bitField0_ |= 0x00000010;
              break;
            } // case 40
            case 48: {
              forcedGuarantee_ = input.readBool();
              bitField0_ |= 0x00000020;
              break;
            } // case 48
            case 162: {
              bizScene_ = input.readStringRequireUtf8();
              bitField0_ |= 0x00000040;
              break;
            } // case 162
            case 242: {
              com.google.protobuf.MapEntry<String, String>
              buriedPointMap__ = input.readMessage(
                  BuriedPointMapDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
              internalGetMutableBuriedPointMap().getMutableMap().put(
                  buriedPointMap__.getKey(), buriedPointMap__.getValue());
              bitField0_ |= 0x00000080;
              break;
            } // case 242
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private Common common_;
    private com.google.protobuf.SingleFieldBuilderV3<
        Common, Common.Builder, CommonOrBuilder> commonBuilder_;
    /**
     * <code>.Common common = 1;</code>
     * @return Whether the common field is set.
     */
    public boolean hasCommon() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <code>.Common common = 1;</code>
     * @return The common.
     */
    public Common getCommon() {
      if (commonBuilder_ == null) {
        return common_ == null ? Common.getDefaultInstance() : common_;
      } else {
        return commonBuilder_.getMessage();
      }
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder setCommon(Common value) {
      if (commonBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        common_ = value;
      } else {
        commonBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder setCommon(
        Common.Builder builderForValue) {
      if (commonBuilder_ == null) {
        common_ = builderForValue.build();
      } else {
        commonBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder mergeCommon(Common value) {
      if (commonBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0) &&
          common_ != null &&
          common_ != Common.getDefaultInstance()) {
          getCommonBuilder().mergeFrom(value);
        } else {
          common_ = value;
        }
      } else {
        commonBuilder_.mergeFrom(value);
      }
      if (common_ != null) {
        bitField0_ |= 0x00000001;
        onChanged();
      }
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Builder clearCommon() {
      bitField0_ = (bitField0_ & ~0x00000001);
      common_ = null;
      if (commonBuilder_ != null) {
        commonBuilder_.dispose();
        commonBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public Common.Builder getCommonBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getCommonFieldBuilder().getBuilder();
    }
    /**
     * <code>.Common common = 1;</code>
     */
    public CommonOrBuilder getCommonOrBuilder() {
      if (commonBuilder_ != null) {
        return commonBuilder_.getMessageOrBuilder();
      } else {
        return common_ == null ?
            Common.getDefaultInstance() : common_;
      }
    }
    /**
     * <code>.Common common = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        Common, Common.Builder, CommonOrBuilder>
        getCommonFieldBuilder() {
      if (commonBuilder_ == null) {
        commonBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            Common, Common.Builder, CommonOrBuilder>(
                getCommon(),
                getParentForChildren(),
                isClean());
        common_ = null;
      }
      return commonBuilder_;
    }

    private Object content_ = "";
    /**
     * <code>string content = 2;</code>
     * @return The content.
     */
    public String getContent() {
      Object ref = content_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        content_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string content = 2;</code>
     * @return The bytes for content.
     */
    public com.google.protobuf.ByteString
        getContentBytes() {
      Object ref = content_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        content_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string content = 2;</code>
     * @param value The content to set.
     * @return This builder for chaining.
     */
    public Builder setContent(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      content_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <code>string content = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearContent() {
      content_ = getDefaultInstance().getContent();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <code>string content = 2;</code>
     * @param value The bytes for content to set.
     * @return This builder for chaining.
     */
    public Builder setContentBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      content_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private boolean supprotLandscape_ ;
    /**
     * <code>bool supprotLandscape = 3;</code>
     * @return The supprotLandscape.
     */
    @Override
    public boolean getSupprotLandscape() {
      return supprotLandscape_;
    }
    /**
     * <code>bool supprotLandscape = 3;</code>
     * @param value The supprotLandscape to set.
     * @return This builder for chaining.
     */
    public Builder setSupprotLandscape(boolean value) {

      supprotLandscape_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <code>bool supprotLandscape = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearSupprotLandscape() {
      bitField0_ = (bitField0_ & ~0x00000004);
      supprotLandscape_ = false;
      onChanged();
      return this;
    }

    private int roommessagetype_ = 0;
    /**
     * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
     * @return The enum numeric value on the wire for roommessagetype.
     */
    @Override public int getRoommessagetypeValue() {
      return roommessagetype_;
    }
    /**
     * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
     * @param value The enum numeric value on the wire for roommessagetype to set.
     * @return This builder for chaining.
     */
    public Builder setRoommessagetypeValue(int value) {
      roommessagetype_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
     * @return The roommessagetype.
     */
    @Override
    public RoomMsgTypeEnum getRoommessagetype() {
      RoomMsgTypeEnum result = RoomMsgTypeEnum.forNumber(roommessagetype_);
      return result == null ? RoomMsgTypeEnum.UNRECOGNIZED : result;
    }
    /**
     * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
     * @param value The roommessagetype to set.
     * @return This builder for chaining.
     */
    public Builder setRoommessagetype(RoomMsgTypeEnum value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000008;
      roommessagetype_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <code>.RoomMsgTypeEnum roommessagetype = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearRoommessagetype() {
      bitField0_ = (bitField0_ & ~0x00000008);
      roommessagetype_ = 0;
      onChanged();
      return this;
    }

    private boolean systemTopMsg_ ;
    /**
     * <code>bool systemTopMsg = 5;</code>
     * @return The systemTopMsg.
     */
    @Override
    public boolean getSystemTopMsg() {
      return systemTopMsg_;
    }
    /**
     * <code>bool systemTopMsg = 5;</code>
     * @param value The systemTopMsg to set.
     * @return This builder for chaining.
     */
    public Builder setSystemTopMsg(boolean value) {

      systemTopMsg_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <code>bool systemTopMsg = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearSystemTopMsg() {
      bitField0_ = (bitField0_ & ~0x00000010);
      systemTopMsg_ = false;
      onChanged();
      return this;
    }

    private boolean forcedGuarantee_ ;
    /**
     * <code>bool forcedGuarantee = 6;</code>
     * @return The forcedGuarantee.
     */
    @Override
    public boolean getForcedGuarantee() {
      return forcedGuarantee_;
    }
    /**
     * <code>bool forcedGuarantee = 6;</code>
     * @param value The forcedGuarantee to set.
     * @return This builder for chaining.
     */
    public Builder setForcedGuarantee(boolean value) {

      forcedGuarantee_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     * <code>bool forcedGuarantee = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearForcedGuarantee() {
      bitField0_ = (bitField0_ & ~0x00000020);
      forcedGuarantee_ = false;
      onChanged();
      return this;
    }

    private Object bizScene_ = "";
    /**
     * <code>string bizScene = 20;</code>
     * @return The bizScene.
     */
    public String getBizScene() {
      Object ref = bizScene_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        bizScene_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string bizScene = 20;</code>
     * @return The bytes for bizScene.
     */
    public com.google.protobuf.ByteString
        getBizSceneBytes() {
      Object ref = bizScene_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        bizScene_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string bizScene = 20;</code>
     * @param value The bizScene to set.
     * @return This builder for chaining.
     */
    public Builder setBizScene(
        String value) {
      if (value == null) { throw new NullPointerException(); }
      bizScene_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     * <code>string bizScene = 20;</code>
     * @return This builder for chaining.
     */
    public Builder clearBizScene() {
      bizScene_ = getDefaultInstance().getBizScene();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     * <code>string bizScene = 20;</code>
     * @param value The bytes for bizScene to set.
     * @return This builder for chaining.
     */
    public Builder setBizSceneBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) { throw new NullPointerException(); }
      checkByteStringIsUtf8(value);
      bizScene_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private com.google.protobuf.MapField<
        String, String> buriedPointMap_;
    private com.google.protobuf.MapField<String, String>
        internalGetBuriedPointMap() {
      if (buriedPointMap_ == null) {
        return com.google.protobuf.MapField.emptyMapField(
            BuriedPointMapDefaultEntryHolder.defaultEntry);
      }
      return buriedPointMap_;
    }
    private com.google.protobuf.MapField<String, String>
        internalGetMutableBuriedPointMap() {
      if (buriedPointMap_ == null) {
        buriedPointMap_ = com.google.protobuf.MapField.newMapField(
            BuriedPointMapDefaultEntryHolder.defaultEntry);
      }
      if (!buriedPointMap_.isMutable()) {
        buriedPointMap_ = buriedPointMap_.copy();
      }
      bitField0_ |= 0x00000080;
      onChanged();
      return buriedPointMap_;
    }
    public int getBuriedPointMapCount() {
      return internalGetBuriedPointMap().getMap().size();
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    @Override
    public boolean containsBuriedPointMap(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      return internalGetBuriedPointMap().getMap().containsKey(key);
    }
    /**
     * Use {@link #getBuriedPointMapMap()} instead.
     */
    @Override
    @Deprecated
    public java.util.Map<String, String> getBuriedPointMap() {
      return getBuriedPointMapMap();
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    @Override
    public java.util.Map<String, String> getBuriedPointMapMap() {
      return internalGetBuriedPointMap().getMap();
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    @Override
    public /* nullable */
String getBuriedPointMapOrDefault(
        String key,
        /* nullable */
String defaultValue) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<String, String> map =
          internalGetBuriedPointMap().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    @Override
    public String getBuriedPointMapOrThrow(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      java.util.Map<String, String> map =
          internalGetBuriedPointMap().getMap();
      if (!map.containsKey(key)) {
        throw new IllegalArgumentException();
      }
      return map.get(key);
    }
    public Builder clearBuriedPointMap() {
      bitField0_ = (bitField0_ & ~0x00000080);
      internalGetMutableBuriedPointMap().getMutableMap()
          .clear();
      return this;
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    public Builder removeBuriedPointMap(
        String key) {
      if (key == null) { throw new NullPointerException("map key"); }
      internalGetMutableBuriedPointMap().getMutableMap()
          .remove(key);
      return this;
    }
    /**
     * Use alternate mutation accessors instead.
     */
    @Deprecated
    public java.util.Map<String, String>
        getMutableBuriedPointMap() {
      bitField0_ |= 0x00000080;
      return internalGetMutableBuriedPointMap().getMutableMap();
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    public Builder putBuriedPointMap(
        String key,
        String value) {
      if (key == null) { throw new NullPointerException("map key"); }
      if (value == null) { throw new NullPointerException("map value"); }
      internalGetMutableBuriedPointMap().getMutableMap()
          .put(key, value);
      bitField0_ |= 0x00000080;
      return this;
    }
    /**
     * <code>map&lt;string, string&gt; buriedPointMap = 30;</code>
     */
    public Builder putAllBuriedPointMap(
        java.util.Map<String, String> values) {
      internalGetMutableBuriedPointMap().getMutableMap()
          .putAll(values);
      bitField0_ |= 0x00000080;
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:RoomMessage)
  }

  // @@protoc_insertion_point(class_scope:RoomMessage)
  private static final RoomMessage DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new RoomMessage();
  }

  public static RoomMessage getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<RoomMessage>
      PARSER = new com.google.protobuf.AbstractParser<RoomMessage>() {
    @Override
    public RoomMessage parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

  public static com.google.protobuf.Parser<RoomMessage> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<RoomMessage> getParserForType() {
    return PARSER;
  }

  @Override
  public RoomMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

